{% load humanize %}
<table id="invoice_table" class="tablesorter list">
<thead>
    <tr>
        <th>No.</th>
        <th>학교명</th>
        <th>회차</th>
        <th>Invoiced Date</th>
        <th>Due Date</th>
        <th>Amount</th>
        <th>Coodi</th>
        <th>Pay Date</th>
        <th>Status</th>
    </tr>
</thead>
<tbody>
{% for invoice in invoices %}
    <tr>
        <td>{{ invoice.no|default_if_none:"-"  }}</td>
        <td><a href="{% url invoice_school_list invoice.school.id invoice.year %}">{{ invoice.school.name }}_{{ invoice.school.stage }}</a></td>
        <td><a href="{% url tempinvoice_detail invoice.id %}">{{ invoice.year}}-{{ invoice.month }}</a></td>
        <td>{{ invoice.invoiced_date }}</td>
        <td>{{ invoice.due_date }}</td>
        <td>{{ invoice.total_price|intcomma }}</td>
        <td>{{ invoice.school.coordinator }}</td>
        <td>{{ invoice.pay_date|default_if_none:"-" }}</td>
        <td>{{ invoice.status }}</td>
    </tr>
{% endfor %}
</tbody>
</table>
